import { get } from '../../common/services'
import { FetchActivityListReq, FetchActivityListRes, IActivityDetail } from './interface'

/**
 *
 * @param size number 请求的个数
 * @param page number 页码
 * @returns
 */
export const fetchActivityList = (params: FetchActivityListReq) => {
  const { page = 1 } = params
  return get<FetchActivityListRes>(`/api/activity/list/${page}`, params)
}

export const fetchActivityDetail = (id: string) =>
  get<IActivityDetail>(`/api/activity/detail/${id}`)
